package com.bao.work;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.charset.Charset;

/**
 * @author baoye
 * @date 2024-08-05/17:02
 */
public class Work02 {
    public static void main(String[] args) throws Exception {
        BufferedInputStream fis=new BufferedInputStream(new FileInputStream("D:\\course\\02-JavaSE进阶\\day10-IO流\\作业\\我想对你说.txt"));
        BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream("day09\\src\\com\\bao\\work\\testIO\\章老师的话.txt"));

        byte[] car=new byte[10];
        int len;
        while((len=fis.read(car))!=-1){
            fos.write(car,0,len);

            fos.flush();
        }

        fos.close();
        fis.close();
    }
}
